import { defineConfig } from 'vite';
import base from './base.js';
import { DEFINE } from './production.js';

export default defineConfig(async ({ command, mode, ssrBuild }) => {
  let o = {
    mode: mode,
    define: {
      ...DEFINE,
    },
    server: {
      open: true,
      host: true,
      port: 2728,
      fs: {
        strict: true,
      },
    },
    plugins: [],
  };

  return await base({ command, mode, ssrBuild }, o);
});
